{
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.7.12",
      "mimetype": "text/x-python",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "pygments_lexer": "ipython3",
      "nbconvert_exporter": "python",
      "file_extension": ".py"
    },
    "colab": {
      "provenance": [],
      "gpuType": "T4"
    }
  },
  "nbformat_minor": 0,
  "nbformat": 4,
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Document Question-Answer [h2oGPT](https://github.com/h2oai/h2ogpt)\n",
        "\n",
        "In this notebook, we demonstrate how one can use h2oGPT with a large language model.\n",
        "\n",
        "To begin, please get free ngrok account to get auth token (e.g.) using your Google email/login and get token: https://dashboard.ngrok.com/get-started/setup .  You will be asked for this token below in an input box."
      ],
      "metadata": {
        "id": "a5WqLjn4-chc"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "!git clone https://github.com/h2oai/h2ogpt.git\n",
        "!cd h2ogpt && git checkout 2668694581347b0d1afe76760213db46f7214126 -q\n",
        "!cp -ar h2ogpt/. ./\n",
        "!rm -r h2ogpt"
      ],
      "metadata": {
        "execution": {
          "iopub.status.busy": "2023-04-19T05:04:22.652611Z",
          "iopub.execute_input": "2023-04-19T05:04:22.653611Z",
          "iopub.status.idle": "2023-04-19T05:04:28.381885Z",
          "shell.execute_reply.started": "2023-04-19T05:04:22.653556Z",
          "shell.execute_reply": "2023-04-19T05:04:28.380315Z"
        },
        "trusted": true,
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "CD1TvqW8-che",
        "outputId": "bb42ebdf-66bf-4fdf-d7dd-16aae728a9de"
      },
      "execution_count": 1,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Cloning into 'h2ogpt'...\n",
            "remote: Enumerating objects: 9204, done.\u001b[K\n",
            "remote: Counting objects: 100% (1703/1703), done.\u001b[K\n",
            "remote: Compressing objects: 100% (375/375), done.\u001b[K\n",
            "remote: Total 9204 (delta 1413), reused 1496 (delta 1322), pack-reused 7501\u001b[K\n",
            "Receiving objects: 100% (9204/9204), 16.93 MiB | 6.41 MiB/s, done.\n",
            "Resolving deltas: 100% (6161/6161), done.\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# Install pyhon 3.10 that will be used within pipenv\n",
        "!sudo add-apt-repository ppa:deadsnakes/ppa -y > /dev/null\n",
        "!sudo apt install python3.10 python3.10-distutils psmisc -y > /dev/null\n",
        "!curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 > /dev/null"
      ],
      "metadata": {
        "execution": {
          "iopub.status.busy": "2023-04-19T05:04:36.253404Z",
          "iopub.execute_input": "2023-04-19T05:04:36.254498Z",
          "iopub.status.idle": "2023-04-19T05:09:08.846475Z",
          "shell.execute_reply.started": "2023-04-19T05:04:36.254436Z",
          "shell.execute_reply": "2023-04-19T05:09:08.844973Z"
        },
        "trusted": true,
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "YWdHujUB-chf",
        "outputId": "13dd0f37-5223-49d8-cf54-ba18680c282c"
      },
      "execution_count": 2,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "WARNING: apt does not have a stable CLI interface. Use with caution in scripts.\n",
            "\n",
            "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
            "\u001b[0m"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# Install dependencies\n",
        "!for fil in requirements.txt reqs_optional/requirements_optional_langchain.txt reqs_optional/requirements_optional_llamacpp_gpt4all.txt reqs_optional/requirements_optional_langchain.gpllike.txt reqs_optional/requirements_optional_langchain.urls.txt ; do pip install -r $fil ; done\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "RGWAnUt2sA-V",
        "outputId": "84f327ae-2b09-4e5e-eeb4-2b3c9173e847"
      },
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Collecting git+https://github.com/huggingface/peft.git@0b62b4378b4ce9367932c73540349da9a41bdea8 (from -r requirements.txt (line 22))\n",
            "  Cloning https://github.com/huggingface/peft.git (to revision 0b62b4378b4ce9367932c73540349da9a41bdea8) to /tmp/pip-req-build-13nzqnb6\n",
            "  Running command git clone --filter=blob:none --quiet https://github.com/huggingface/peft.git /tmp/pip-req-build-13nzqnb6\n",
            "  Running command git rev-parse -q --verify 'sha^0b62b4378b4ce9367932c73540349da9a41bdea8'\n",
            "  Running command git fetch -q https://github.com/huggingface/peft.git 0b62b4378b4ce9367932c73540349da9a41bdea8\n",
            "  Running command git checkout -q 0b62b4378b4ce9367932c73540349da9a41bdea8\n",
            "  Resolved https://github.com/huggingface/peft.git to commit 0b62b4378b4ce9367932c73540349da9a41bdea8\n",
            "  Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
            "  Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
            "  Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
            "Ignoring pypandoc: markers 'sys_platform == \"darwin\" and platform_machine == \"arm64\"' don't match your environment\n",
            "Requirement already satisfied: datasets==2.13.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 2)) (2.13.0)\n",
            "Requirement already satisfied: sentencepiece==0.1.99 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 3)) (0.1.99)\n",
            "Requirement already satisfied: gradio==3.35.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 4)) (3.35.2)\n",
            "Requirement already satisfied: huggingface_hub==0.15.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 5)) (0.15.1)\n",
            "Requirement already satisfied: appdirs==1.4.4 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 6)) (1.4.4)\n",
            "Requirement already satisfied: fire==0.5.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (0.5.0)\n",
            "Requirement already satisfied: docutils==0.20.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 8)) (0.20.1)\n",
            "Requirement already satisfied: torch==2.0.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 9)) (2.0.1+cu118)\n",
            "Requirement already satisfied: evaluate==0.4.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 10)) (0.4.0)\n",
            "Requirement already satisfied: rouge_score==0.1.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 11)) (0.1.2)\n",
            "Requirement already satisfied: sacrebleu==2.3.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 12)) (2.3.1)\n",
            "Requirement already satisfied: scikit-learn==1.2.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 13)) (1.2.2)\n",
            "Requirement already satisfied: alt-profanity-check==1.2.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 14)) (1.2.2)\n",
            "Requirement already satisfied: better-profanity==0.7.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 15)) (0.7.0)\n",
            "Collecting numpy==1.24.3 (from -r requirements.txt (line 16))\n",
            "  Using cached numpy-1.24.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)\n",
            "Collecting pandas==2.0.2 (from -r requirements.txt (line 17))\n",
            "  Using cached pandas-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB)\n",
            "Requirement already satisfied: matplotlib==3.7.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 18)) (3.7.1)\n",
            "Requirement already satisfied: loralib==0.1.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 19)) (0.1.1)\n",
            "Requirement already satisfied: bitsandbytes==0.39.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 20)) (0.39.0)\n",
            "Requirement already satisfied: accelerate==0.20.3 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 21)) (0.20.3)\n",
            "Requirement already satisfied: transformers==4.30.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 23)) (4.30.2)\n",
            "Requirement already satisfied: tokenizers==0.13.3 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 24)) (0.13.3)\n",
            "Requirement already satisfied: APScheduler==3.10.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 25)) (3.10.1)\n",
            "Requirement already satisfied: pynvml==11.5.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 28)) (11.5.0)\n",
            "Requirement already satisfied: psutil==5.9.5 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 29)) (5.9.5)\n",
            "Requirement already satisfied: boto3==1.26.101 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 30)) (1.26.101)\n",
            "Requirement already satisfied: botocore==1.29.101 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 31)) (1.29.101)\n",
            "Requirement already satisfied: tensorboard==2.13.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 34)) (2.13.0)\n",
            "Requirement already satisfied: neptune==1.2.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 35)) (1.2.0)\n",
            "Requirement already satisfied: gradio_client==0.2.7 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 38)) (0.2.7)\n",
            "Requirement already satisfied: beautifulsoup4==4.12.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 39)) (4.12.2)\n",
            "Requirement already satisfied: markdown==3.4.3 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 40)) (3.4.3)\n",
            "Requirement already satisfied: pytest==7.2.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 43)) (7.2.2)\n",
            "Requirement already satisfied: pytest-xdist==3.2.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 44)) (3.2.1)\n",
            "Requirement already satisfied: nltk==3.8.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 45)) (3.8.1)\n",
            "Requirement already satisfied: textstat==0.7.3 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 46)) (0.7.3)\n",
            "Requirement already satisfied: pypandoc_binary==1.11 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 49)) (1.11)\n",
            "Requirement already satisfied: openpyxl==3.1.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 50)) (3.1.2)\n",
            "Requirement already satisfied: lm_dataformat==0.0.20 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 51)) (0.0.20)\n",
            "Requirement already satisfied: bioc==2.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 52)) (2.0)\n",
            "Requirement already satisfied: einops==0.6.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 55)) (0.6.1)\n",
            "Requirement already satisfied: instructorembedding==1.0.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 56)) (1.0.1)\n",
            "Requirement already satisfied: python-dotenv==1.0.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 59)) (1.0.0)\n",
            "Requirement already satisfied: text-generation==0.6.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 61)) (0.6.0)\n",
            "Requirement already satisfied: tiktoken==0.4.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 63)) (0.4.0)\n",
            "Requirement already satisfied: openai==0.27.8 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 65)) (0.27.8)\n",
            "Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (9.0.0)\n",
            "Requirement already satisfied: dill<0.3.7,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (0.3.6)\n",
            "Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (2.31.0)\n",
            "Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (4.65.0)\n",
            "Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (3.2.0)\n",
            "Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (0.70.14)\n",
            "Requirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (2023.6.0)\n",
            "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (3.8.4)\n",
            "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (23.1)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets==2.13.0->-r requirements.txt (line 2)) (6.0)\n",
            "Requirement already satisfied: aiofiles in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (23.1.0)\n",
            "Requirement already satisfied: altair>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (4.2.2)\n",
            "Requirement already satisfied: fastapi in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (0.100.0)\n",
            "Requirement already satisfied: ffmpy in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (0.3.0)\n",
            "Requirement already satisfied: httpx in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (0.23.3)\n",
            "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (3.1.2)\n",
            "Requirement already satisfied: markdown-it-py[linkify]>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (2.2.0)\n",
            "Requirement already satisfied: markupsafe in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (2.1.3)\n",
            "Requirement already satisfied: mdit-py-plugins<=0.3.3 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (0.3.3)\n",
            "Requirement already satisfied: orjson in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (3.9.2)\n",
            "Requirement already satisfied: pillow in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (10.0.0)\n",
            "Requirement already satisfied: pydantic in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (1.10.9)\n",
            "Requirement already satisfied: pydub in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (0.25.1)\n",
            "Requirement already satisfied: pygments>=2.12.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (2.14.0)\n",
            "Requirement already satisfied: python-multipart in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (0.0.6)\n",
            "Requirement already satisfied: semantic-version in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (2.10.0)\n",
            "Requirement already satisfied: uvicorn>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (0.22.0)\n",
            "Requirement already satisfied: websockets>=10.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->-r requirements.txt (line 4)) (11.0.3)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.15.1->-r requirements.txt (line 5)) (3.12.2)\n",
            "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub==0.15.1->-r requirements.txt (line 5)) (4.6.3)\n",
            "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from fire==0.5.0->-r requirements.txt (line 7)) (1.16.0)\n",
            "Requirement already satisfied: termcolor in /usr/local/lib/python3.10/dist-packages (from fire==0.5.0->-r requirements.txt (line 7)) (2.3.0)\n",
            "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->-r requirements.txt (line 9)) (1.11.1)\n",
            "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->-r requirements.txt (line 9)) (3.1)\n",
            "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1->-r requirements.txt (line 9)) (2.0.0)\n",
            "Requirement already satisfied: responses<0.19 in /usr/local/lib/python3.10/dist-packages (from evaluate==0.4.0->-r requirements.txt (line 10)) (0.18.0)\n",
            "Requirement already satisfied: absl-py in /usr/local/lib/python3.10/dist-packages (from rouge_score==0.1.2->-r requirements.txt (line 11)) (1.4.0)\n",
            "Requirement already satisfied: portalocker in /usr/local/lib/python3.10/dist-packages (from sacrebleu==2.3.1->-r requirements.txt (line 12)) (2.7.0)\n",
            "Requirement already satisfied: regex in /usr/local/lib/python3.10/dist-packages (from sacrebleu==2.3.1->-r requirements.txt (line 12)) (2022.10.31)\n",
            "Requirement already satisfied: tabulate>=0.8.9 in /usr/local/lib/python3.10/dist-packages (from sacrebleu==2.3.1->-r requirements.txt (line 12)) (0.9.0)\n",
            "Requirement already satisfied: colorama in /usr/local/lib/python3.10/dist-packages (from sacrebleu==2.3.1->-r requirements.txt (line 12)) (0.4.6)\n",
            "Requirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from sacrebleu==2.3.1->-r requirements.txt (line 12)) (4.9.2)\n",
            "Requirement already satisfied: scipy>=1.3.2 in /usr/local/lib/python3.10/dist-packages (from scikit-learn==1.2.2->-r requirements.txt (line 13)) (1.10.1)\n",
            "Requirement already satisfied: joblib>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from scikit-learn==1.2.2->-r requirements.txt (line 13)) (1.2.0)\n",
            "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn==1.2.2->-r requirements.txt (line 13)) (3.1.0)\n",
            "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas==2.0.2->-r requirements.txt (line 17)) (2.8.2)\n",
            "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas==2.0.2->-r requirements.txt (line 17)) (2022.7.1)\n",
            "Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas==2.0.2->-r requirements.txt (line 17)) (2023.3)\n",
            "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.1->-r requirements.txt (line 18)) (1.1.0)\n",
            "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.1->-r requirements.txt (line 18)) (0.11.0)\n",
            "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.1->-r requirements.txt (line 18)) (4.40.0)\n",
            "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.1->-r requirements.txt (line 18)) (1.4.4)\n",
            "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.1->-r requirements.txt (line 18)) (3.1.0)\n",
            "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.30.2->-r requirements.txt (line 23)) (0.3.1)\n",
            "Requirement already satisfied: setuptools>=0.7 in /usr/local/lib/python3.10/dist-packages (from APScheduler==3.10.1->-r requirements.txt (line 25)) (67.7.2)\n",
            "Requirement already satisfied: tzlocal!=3.*,>=2.0 in /usr/local/lib/python3.10/dist-packages (from APScheduler==3.10.1->-r requirements.txt (line 25)) (5.0.1)\n",
            "Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from boto3==1.26.101->-r requirements.txt (line 30)) (1.0.1)\n",
            "Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from boto3==1.26.101->-r requirements.txt (line 30)) (0.6.1)\n",
            "Requirement already satisfied: urllib3<1.27,>=1.25.4 in /usr/local/lib/python3.10/dist-packages (from botocore==1.29.101->-r requirements.txt (line 31)) (1.26.16)\n",
            "Requirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.10/dist-packages (from tensorboard==2.13.0->-r requirements.txt (line 34)) (1.56.0)\n",
            "Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from tensorboard==2.13.0->-r requirements.txt (line 34)) (2.17.3)\n",
            "Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in /usr/local/lib/python3.10/dist-packages (from tensorboard==2.13.0->-r requirements.txt (line 34)) (1.0.0)\n",
            "Requirement already satisfied: protobuf>=3.19.6 in /usr/local/lib/python3.10/dist-packages (from tensorboard==2.13.0->-r requirements.txt (line 34)) (3.20.3)\n",
            "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard==2.13.0->-r requirements.txt (line 34)) (0.7.1)\n",
            "Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from tensorboard==2.13.0->-r requirements.txt (line 34)) (2.3.6)\n",
            "Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.10/dist-packages (from tensorboard==2.13.0->-r requirements.txt (line 34)) (0.40.0)\n",
            "Requirement already satisfied: GitPython>=2.0.8 in /usr/local/lib/python3.10/dist-packages (from neptune==1.2.0->-r requirements.txt (line 35)) (3.1.32)\n",
            "Requirement already satisfied: PyJWT in /usr/local/lib/python3.10/dist-packages (from neptune==1.2.0->-r requirements.txt (line 35)) (2.7.0)\n",
            "Requirement already satisfied: bravado<12.0.0,>=11.0.0 in /usr/local/lib/python3.10/dist-packages (from neptune==1.2.0->-r requirements.txt (line 35)) (11.0.3)\n",
            "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from neptune==1.2.0->-r requirements.txt (line 35)) (8.1.3)\n",
            "Requirement already satisfied: future>=0.17.1 in /usr/local/lib/python3.10/dist-packages (from neptune==1.2.0->-r requirements.txt (line 35)) (0.18.3)\n",
            "Requirement already satisfied: oauthlib>=2.1.0 in /usr/local/lib/python3.10/dist-packages (from neptune==1.2.0->-r requirements.txt (line 35)) (3.2.2)\n",
            "Requirement already satisfied: requests-oauthlib>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from neptune==1.2.0->-r requirements.txt (line 35)) (1.3.1)\n",
            "Requirement already satisfied: swagger-spec-validator>=2.7.4 in /usr/local/lib/python3.10/dist-packages (from neptune==1.2.0->-r requirements.txt (line 35)) (3.0.3)\n",
            "Requirement already satisfied: websocket-client!=1.0.0,>=0.35.0 in /usr/local/lib/python3.10/dist-packages (from neptune==1.2.0->-r requirements.txt (line 35)) (1.6.0)\n",
            "Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4==4.12.2->-r requirements.txt (line 39)) (2.4.1)\n",
            "Requirement already satisfied: attrs>=19.2.0 in /usr/local/lib/python3.10/dist-packages (from pytest==7.2.2->-r requirements.txt (line 43)) (23.1.0)\n",
            "Requirement already satisfied: iniconfig in /usr/local/lib/python3.10/dist-packages (from pytest==7.2.2->-r requirements.txt (line 43)) (2.0.0)\n",
            "Requirement already satisfied: pluggy<2.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from pytest==7.2.2->-r requirements.txt (line 43)) (1.2.0)\n",
            "Requirement already satisfied: exceptiongroup>=1.0.0rc8 in /usr/local/lib/python3.10/dist-packages (from pytest==7.2.2->-r requirements.txt (line 43)) (1.1.1)\n",
            "Requirement already satisfied: tomli>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from pytest==7.2.2->-r requirements.txt (line 43)) (2.0.1)\n",
            "Requirement already satisfied: execnet>=1.1 in /usr/local/lib/python3.10/dist-packages (from pytest-xdist==3.2.1->-r requirements.txt (line 44)) (2.0.2)\n",
            "Requirement already satisfied: pyphen in /usr/local/lib/python3.10/dist-packages (from textstat==0.7.3->-r requirements.txt (line 46)) (0.14.0)\n",
            "Requirement already satisfied: et-xmlfile in /usr/local/lib/python3.10/dist-packages (from openpyxl==3.1.2->-r requirements.txt (line 50)) (1.1.0)\n",
            "Requirement already satisfied: jsonlines in /usr/local/lib/python3.10/dist-packages (from lm_dataformat==0.0.20->-r requirements.txt (line 51)) (3.1.0)\n",
            "Requirement already satisfied: ujson in /usr/local/lib/python3.10/dist-packages (from lm_dataformat==0.0.20->-r requirements.txt (line 51)) (5.8.0)\n",
            "Requirement already satisfied: zstandard in /usr/local/lib/python3.10/dist-packages (from lm_dataformat==0.0.20->-r requirements.txt (line 51)) (0.21.0)\n",
            "Requirement already satisfied: intervaltree in /usr/local/lib/python3.10/dist-packages (from bioc==2.0->-r requirements.txt (line 52)) (3.1.0)\n",
            "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch==2.0.1->-r requirements.txt (line 9)) (3.25.2)\n",
            "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch==2.0.1->-r requirements.txt (line 9)) (16.0.6)\n",
            "Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets==2.13.0->-r requirements.txt (line 2)) (2.0.12)\n",
            "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets==2.13.0->-r requirements.txt (line 2)) (6.0.4)\n",
            "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets==2.13.0->-r requirements.txt (line 2)) (4.0.2)\n",
            "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets==2.13.0->-r requirements.txt (line 2)) (1.9.2)\n",
            "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets==2.13.0->-r requirements.txt (line 2)) (1.3.3)\n",
            "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets==2.13.0->-r requirements.txt (line 2)) (1.3.1)\n",
            "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (0.4)\n",
            "Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (4.3.3)\n",
            "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (0.12.0)\n",
            "Requirement already satisfied: bravado-core>=5.16.1 in /usr/local/lib/python3.10/dist-packages (from bravado<12.0.0,>=11.0.0->neptune==1.2.0->-r requirements.txt (line 35)) (5.17.1)\n",
            "Requirement already satisfied: msgpack in /usr/local/lib/python3.10/dist-packages (from bravado<12.0.0,>=11.0.0->neptune==1.2.0->-r requirements.txt (line 35)) (1.0.5)\n",
            "Requirement already satisfied: simplejson in /usr/local/lib/python3.10/dist-packages (from bravado<12.0.0,>=11.0.0->neptune==1.2.0->-r requirements.txt (line 35)) (3.19.1)\n",
            "Requirement already satisfied: monotonic in /usr/local/lib/python3.10/dist-packages (from bravado<12.0.0,>=11.0.0->neptune==1.2.0->-r requirements.txt (line 35)) (1.6)\n",
            "Requirement already satisfied: gitdb<5,>=4.0.1 in /usr/local/lib/python3.10/dist-packages (from GitPython>=2.0.8->neptune==1.2.0->-r requirements.txt (line 35)) (4.0.10)\n",
            "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard==2.13.0->-r requirements.txt (line 34)) (5.3.1)\n",
            "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard==2.13.0->-r requirements.txt (line 34)) (0.3.0)\n",
            "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard==2.13.0->-r requirements.txt (line 34)) (4.9)\n",
            "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio==3.35.2->-r requirements.txt (line 4)) (0.1.2)\n",
            "Requirement already satisfied: linkify-it-py<3,>=1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio==3.35.2->-r requirements.txt (line 4)) (2.0.2)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets==2.13.0->-r requirements.txt (line 2)) (3.4)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets==2.13.0->-r requirements.txt (line 2)) (2023.5.7)\n",
            "Requirement already satisfied: h11>=0.8 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio==3.35.2->-r requirements.txt (line 4)) (0.14.0)\n",
            "Requirement already satisfied: starlette<0.28.0,>=0.27.0 in /usr/local/lib/python3.10/dist-packages (from fastapi->gradio==3.35.2->-r requirements.txt (line 4)) (0.27.0)\n",
            "Requirement already satisfied: httpcore<0.17.0,>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from httpx->gradio==3.35.2->-r requirements.txt (line 4)) (0.16.3)\n",
            "Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in /usr/local/lib/python3.10/dist-packages (from httpx->gradio==3.35.2->-r requirements.txt (line 4)) (1.5.0)\n",
            "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio==3.35.2->-r requirements.txt (line 4)) (1.3.0)\n",
            "Requirement already satisfied: sortedcontainers<3.0,>=2.0 in /usr/local/lib/python3.10/dist-packages (from intervaltree->bioc==2.0->-r requirements.txt (line 52)) (2.4.0)\n",
            "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch==2.0.1->-r requirements.txt (line 9)) (1.3.0)\n",
            "Requirement already satisfied: jsonref in /usr/local/lib/python3.10/dist-packages (from bravado-core>=5.16.1->bravado<12.0.0,>=11.0.0->neptune==1.2.0->-r requirements.txt (line 35)) (1.1.0)\n",
            "Requirement already satisfied: smmap<6,>=3.0.1 in /usr/local/lib/python3.10/dist-packages (from gitdb<5,>=4.0.1->GitPython>=2.0.8->neptune==1.2.0->-r requirements.txt (line 35)) (5.0.0)\n",
            "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from httpcore<0.17.0,>=0.15.0->httpx->gradio==3.35.2->-r requirements.txt (line 4)) (3.7.0)\n",
            "Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (0.19.3)\n",
            "Requirement already satisfied: uc-micro-py in /usr/local/lib/python3.10/dist-packages (from linkify-it-py<3,>=1->markdown-it-py[linkify]>=2.0.0->gradio==3.35.2->-r requirements.txt (line 4)) (1.0.2)\n",
            "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard==2.13.0->-r requirements.txt (line 34)) (0.5.0)\n",
            "Requirement already satisfied: fqdn in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (1.5.1)\n",
            "Requirement already satisfied: isoduration in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (20.11.0)\n",
            "Requirement already satisfied: jsonpointer>1.13 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (2.4)\n",
            "Requirement already satisfied: rfc3339-validator in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (0.1.4)\n",
            "Requirement already satisfied: rfc3987 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (1.3.8)\n",
            "Requirement already satisfied: uri-template in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (1.3.0)\n",
            "Requirement already satisfied: webcolors>=1.11 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (1.13)\n",
            "Requirement already satisfied: arrow>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from isoduration->jsonschema>=3.0->altair>=4.2.0->gradio==3.35.2->-r requirements.txt (line 4)) (1.2.3)\n",
            "Installing collected packages: numpy, pandas\n",
            "  Attempting uninstall: numpy\n",
            "    Found existing installation: numpy 1.23.5\n",
            "    Uninstalling numpy-1.23.5:\n",
            "      Successfully uninstalled numpy-1.23.5\n",
            "  Attempting uninstall: pandas\n",
            "    Found existing installation: pandas 1.5.3\n",
            "    Uninstalling pandas-1.5.3:\n",
            "      Successfully uninstalled pandas-1.5.3\n",
            "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
            "argilla 1.12.0 requires numpy<1.24.0, but you have numpy 1.24.3 which is incompatible.\n",
            "argilla 1.12.0 requires pandas<2.0.0,>=1.0.0, but you have pandas 2.0.2 which is incompatible.\n",
            "google-colab 1.0.0 requires pandas==1.5.3, but you have pandas 2.0.2 which is incompatible.\n",
            "google-colab 1.0.0 requires requests==2.27.1, but you have requests 2.31.0 which is incompatible.\n",
            "numba 0.56.4 requires numpy<1.24,>=1.18, but you have numpy 1.24.3 which is incompatible.\n",
            "tensorflow 2.12.0 requires numpy<1.24,>=1.22, but you have numpy 1.24.3 which is incompatible.\n",
            "tensorflow 2.12.0 requires tensorboard<2.13,>=2.12, but you have tensorboard 2.13.0 which is incompatible.\u001b[0m\u001b[31m\n",
            "\u001b[0mSuccessfully installed numpy-1.24.3 pandas-2.0.2\n",
            "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
            "\u001b[0mRequirement already satisfied: langchain==0.0.202 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 2)) (0.0.202)\n",
            "Requirement already satisfied: pypdf==3.9.1 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 3)) (3.9.1)\n",
            "Requirement already satisfied: sentence_transformers==2.2.2 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 8)) (2.2.2)\n",
            "Requirement already satisfied: chromadb==0.3.25 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.3.25)\n",
            "Requirement already satisfied: unstructured[local-inference]==0.7.4 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.7.4)\n",
            "Requirement already satisfied: pillow in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 23)) (10.0.0)\n",
            "Requirement already satisfied: pdfminer.six==20221105 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 25)) (20221105)\n",
            "Requirement already satisfied: urllib3 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 26)) (1.26.16)\n",
            "Requirement already satisfied: requests_file in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 27)) (1.5.1)\n",
            "Requirement already satisfied: tabulate==0.9.0 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 31)) (0.9.0)\n",
            "Requirement already satisfied: pip-licenses==4.3.0 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 39)) (4.3.0)\n",
            "Requirement already satisfied: weaviate-client==3.20.0 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.txt (line 42)) (3.20.0)\n",
            "Requirement already satisfied: PyYAML>=5.4.1 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (6.0)\n",
            "Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (2.0.16)\n",
            "Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (3.8.4)\n",
            "Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (4.0.2)\n",
            "Requirement already satisfied: dataclasses-json<0.6.0,>=0.5.7 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (0.5.9)\n",
            "Requirement already satisfied: langchainplus-sdk>=0.0.9 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (0.0.20)\n",
            "Requirement already satisfied: numexpr<3.0.0,>=2.8.4 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (2.8.4)\n",
            "Requirement already satisfied: numpy<2,>=1 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (1.24.3)\n",
            "Requirement already satisfied: openapi-schema-pydantic<2.0,>=1.2 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (1.2.4)\n",
            "Requirement already satisfied: pydantic<2,>=1 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (1.10.9)\n",
            "Requirement already satisfied: requests<3,>=2 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (2.31.0)\n",
            "Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in /usr/local/lib/python3.10/dist-packages (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (8.2.2)\n",
            "Requirement already satisfied: transformers<5.0.0,>=4.6.0 in /usr/local/lib/python3.10/dist-packages (from sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (4.30.2)\n",
            "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (4.65.0)\n",
            "Requirement already satisfied: torch>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (2.0.1+cu118)\n",
            "Requirement already satisfied: torchvision in /usr/local/lib/python3.10/dist-packages (from sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (0.15.2+cu118)\n",
            "Requirement already satisfied: scikit-learn in /usr/local/lib/python3.10/dist-packages (from sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (1.2.2)\n",
            "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (1.10.1)\n",
            "Requirement already satisfied: nltk in /usr/local/lib/python3.10/dist-packages (from sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (3.8.1)\n",
            "Requirement already satisfied: sentencepiece in /usr/local/lib/python3.10/dist-packages (from sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (0.1.99)\n",
            "Requirement already satisfied: huggingface-hub>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (0.15.1)\n",
            "Requirement already satisfied: pandas>=1.3 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (2.0.2)\n",
            "Requirement already satisfied: hnswlib>=0.7 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.7.0)\n",
            "Requirement already satisfied: clickhouse-connect>=0.5.7 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.6.6)\n",
            "Requirement already satisfied: duckdb>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.8.1)\n",
            "Requirement already satisfied: fastapi>=0.85.1 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.100.0)\n",
            "Requirement already satisfied: uvicorn[standard]>=0.18.3 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.22.0)\n",
            "Requirement already satisfied: posthog>=2.4.0 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (3.0.1)\n",
            "Requirement already satisfied: onnxruntime>=1.14.1 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (1.15.1)\n",
            "Requirement already satisfied: tokenizers>=0.13.2 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.13.3)\n",
            "Requirement already satisfied: typing-extensions>=4.5.0 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (4.6.3)\n",
            "Requirement already satisfied: overrides>=7.3.1 in /usr/local/lib/python3.10/dist-packages (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (7.3.1)\n",
            "Requirement already satisfied: argilla in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.12.0)\n",
            "Requirement already satisfied: chardet in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (4.0.0)\n",
            "Requirement already satisfied: filetype in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.2.0)\n",
            "Requirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (4.9.2)\n",
            "Requirement already satisfied: msg-parser in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.2.0)\n",
            "Requirement already satisfied: openpyxl in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (3.1.2)\n",
            "Requirement already satisfied: pypandoc in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.11)\n",
            "Requirement already satisfied: python-docx in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.8.11)\n",
            "Requirement already satisfied: python-pptx in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.6.21)\n",
            "Requirement already satisfied: python-magic in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.4.27)\n",
            "Requirement already satisfied: markdown in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (3.4.3)\n",
            "Requirement already satisfied: xlrd in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (2.0.1)\n",
            "Requirement already satisfied: unstructured-inference==0.5.1 in /usr/local/lib/python3.10/dist-packages (from unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.5.1)\n",
            "Requirement already satisfied: charset-normalizer>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from pdfminer.six==20221105->-r reqs_optional/requirements_optional_langchain.txt (line 25)) (2.0.12)\n",
            "Requirement already satisfied: cryptography>=36.0.0 in /usr/local/lib/python3.10/dist-packages (from pdfminer.six==20221105->-r reqs_optional/requirements_optional_langchain.txt (line 25)) (41.0.1)\n",
            "Requirement already satisfied: prettytable>=2.3.0 in /usr/local/lib/python3.10/dist-packages (from pip-licenses==4.3.0->-r reqs_optional/requirements_optional_langchain.txt (line 39)) (3.8.0)\n",
            "Requirement already satisfied: validators<=0.21.0,>=0.18.2 in /usr/local/lib/python3.10/dist-packages (from weaviate-client==3.20.0->-r reqs_optional/requirements_optional_langchain.txt (line 42)) (0.20.0)\n",
            "Requirement already satisfied: authlib>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from weaviate-client==3.20.0->-r reqs_optional/requirements_optional_langchain.txt (line 42)) (1.2.1)\n",
            "Requirement already satisfied: layoutparser[layoutmodels,tesseract] in /usr/local/lib/python3.10/dist-packages (from unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.3.4)\n",
            "Requirement already satisfied: python-multipart in /usr/local/lib/python3.10/dist-packages (from unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.0.6)\n",
            "Requirement already satisfied: opencv-python!=4.7.0.68 in /usr/local/lib/python3.10/dist-packages (from unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (4.7.0.72)\n",
            "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from requests_file->-r reqs_optional/requirements_optional_langchain.txt (line 27)) (1.16.0)\n",
            "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (23.1.0)\n",
            "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (6.0.4)\n",
            "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (1.9.2)\n",
            "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (1.3.3)\n",
            "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (1.3.1)\n",
            "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from clickhouse-connect>=0.5.7->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (2023.5.7)\n",
            "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.10/dist-packages (from clickhouse-connect>=0.5.7->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (6.8.0)\n",
            "Requirement already satisfied: pytz in /usr/local/lib/python3.10/dist-packages (from clickhouse-connect>=0.5.7->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (2022.7.1)\n",
            "Requirement already satisfied: zstandard in /usr/local/lib/python3.10/dist-packages (from clickhouse-connect>=0.5.7->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.21.0)\n",
            "Requirement already satisfied: lz4 in /usr/local/lib/python3.10/dist-packages (from clickhouse-connect>=0.5.7->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (4.3.2)\n",
            "Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.10/dist-packages (from cryptography>=36.0.0->pdfminer.six==20221105->-r reqs_optional/requirements_optional_langchain.txt (line 25)) (1.15.1)\n",
            "Requirement already satisfied: marshmallow<4.0.0,>=3.3.0 in /usr/local/lib/python3.10/dist-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (3.19.0)\n",
            "Requirement already satisfied: marshmallow-enum<2.0.0,>=1.5.1 in /usr/local/lib/python3.10/dist-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (1.5.1)\n",
            "Requirement already satisfied: typing-inspect>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (0.9.0)\n",
            "Requirement already satisfied: starlette<0.28.0,>=0.27.0 in /usr/local/lib/python3.10/dist-packages (from fastapi>=0.85.1->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.27.0)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.4.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (3.12.2)\n",
            "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.4.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (2023.6.0)\n",
            "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.4.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (23.1)\n",
            "Requirement already satisfied: coloredlogs in /usr/local/lib/python3.10/dist-packages (from onnxruntime>=1.14.1->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (15.0.1)\n",
            "Requirement already satisfied: flatbuffers in /usr/local/lib/python3.10/dist-packages (from onnxruntime>=1.14.1->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (23.5.26)\n",
            "Requirement already satisfied: protobuf in /usr/local/lib/python3.10/dist-packages (from onnxruntime>=1.14.1->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (3.20.3)\n",
            "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from onnxruntime>=1.14.1->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (1.11.1)\n",
            "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.3->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (2.8.2)\n",
            "Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=1.3->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (2023.3)\n",
            "Requirement already satisfied: monotonic>=1.5 in /usr/local/lib/python3.10/dist-packages (from posthog>=2.4.0->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (1.6)\n",
            "Requirement already satisfied: backoff>=1.10.0 in /usr/local/lib/python3.10/dist-packages (from posthog>=2.4.0->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (2.2.1)\n",
            "Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prettytable>=2.3.0->pip-licenses==4.3.0->-r reqs_optional/requirements_optional_langchain.txt (line 39)) (0.2.6)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests<3,>=2->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (3.4)\n",
            "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.10/dist-packages (from SQLAlchemy<3,>=1.4->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (2.0.1)\n",
            "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (3.1)\n",
            "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (3.1.2)\n",
            "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (2.0.0)\n",
            "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (3.25.2)\n",
            "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (16.0.6)\n",
            "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.6.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (2022.10.31)\n",
            "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.6.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (0.3.1)\n",
            "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn[standard]>=0.18.3->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (8.1.3)\n",
            "Requirement already satisfied: h11>=0.8 in /usr/local/lib/python3.10/dist-packages (from uvicorn[standard]>=0.18.3->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.14.0)\n",
            "Requirement already satisfied: httptools>=0.5.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn[standard]>=0.18.3->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.6.0)\n",
            "Requirement already satisfied: python-dotenv>=0.13 in /usr/local/lib/python3.10/dist-packages (from uvicorn[standard]>=0.18.3->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (1.0.0)\n",
            "Requirement already satisfied: uvloop!=0.15.0,!=0.15.1,>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn[standard]>=0.18.3->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.17.0)\n",
            "Requirement already satisfied: watchfiles>=0.13 in /usr/local/lib/python3.10/dist-packages (from uvicorn[standard]>=0.18.3->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (0.19.0)\n",
            "Requirement already satisfied: websockets>=10.4 in /usr/local/lib/python3.10/dist-packages (from uvicorn[standard]>=0.18.3->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (11.0.3)\n",
            "Requirement already satisfied: decorator>=3.4.0 in /usr/local/lib/python3.10/dist-packages (from validators<=0.21.0,>=0.18.2->weaviate-client==3.20.0->-r reqs_optional/requirements_optional_langchain.txt (line 42)) (4.4.2)\n",
            "Requirement already satisfied: httpx<0.24,>=0.15 in /usr/local/lib/python3.10/dist-packages (from argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.23.3)\n",
            "Requirement already satisfied: deprecated~=1.2.0 in /usr/local/lib/python3.10/dist-packages (from argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.2.14)\n",
            "Collecting pandas>=1.3 (from chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11))\n",
            "  Using cached pandas-1.5.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.1 MB)\n",
            "Requirement already satisfied: wrapt<1.15,>=1.13 in /usr/local/lib/python3.10/dist-packages (from argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.14.1)\n",
            "Collecting numpy<2,>=1 (from langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2))\n",
            "  Using cached numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)\n",
            "Requirement already satisfied: rich<=13.0.1 in /usr/local/lib/python3.10/dist-packages (from argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (13.0.1)\n",
            "Requirement already satisfied: typer<0.8.0,>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.7.0)\n",
            "Requirement already satisfied: olefile>=0.46 in /usr/local/lib/python3.10/dist-packages (from msg-parser->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.46)\n",
            "Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from nltk->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (1.2.0)\n",
            "Requirement already satisfied: et-xmlfile in /usr/local/lib/python3.10/dist-packages (from openpyxl->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.1.0)\n",
            "Requirement already satisfied: XlsxWriter>=0.5.7 in /usr/local/lib/python3.10/dist-packages (from python-pptx->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (3.1.2)\n",
            "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (3.1.0)\n",
            "Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.12->cryptography>=36.0.0->pdfminer.six==20221105->-r reqs_optional/requirements_optional_langchain.txt (line 25)) (2.21)\n",
            "Requirement already satisfied: httpcore<0.17.0,>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from httpx<0.24,>=0.15->argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.16.3)\n",
            "Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in /usr/local/lib/python3.10/dist-packages (from httpx<0.24,>=0.15->argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.5.0)\n",
            "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx<0.24,>=0.15->argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.3.0)\n",
            "Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from rich<=13.0.1->argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.9.1)\n",
            "Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /usr/local/lib/python3.10/dist-packages (from rich<=13.0.1->argilla->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (2.14.0)\n",
            "Requirement already satisfied: anyio<5,>=3.4.0 in /usr/local/lib/python3.10/dist-packages (from starlette<0.28.0,>=0.27.0->fastapi>=0.85.1->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (3.7.0)\n",
            "Requirement already satisfied: mypy-extensions>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from typing-inspect>=0.4.0->dataclasses-json<0.6.0,>=0.5.7->langchain==0.0.202->-r reqs_optional/requirements_optional_langchain.txt (line 2)) (1.0.0)\n",
            "Requirement already satisfied: humanfriendly>=9.1 in /usr/local/lib/python3.10/dist-packages (from coloredlogs->onnxruntime>=1.14.1->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (10.0)\n",
            "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata->clickhouse-connect>=0.5.7->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (3.15.0)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.6.0->sentence_transformers==2.2.2->-r reqs_optional/requirements_optional_langchain.txt (line 8)) (2.1.3)\n",
            "Requirement already satisfied: iopath in /usr/local/lib/python3.10/dist-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.1.10)\n",
            "Requirement already satisfied: pdfplumber in /usr/local/lib/python3.10/dist-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.9.0)\n",
            "Requirement already satisfied: pdf2image in /usr/local/lib/python3.10/dist-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.16.3)\n",
            "Requirement already satisfied: pytesseract in /usr/local/lib/python3.10/dist-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.3.10)\n",
            "Requirement already satisfied: effdet in /usr/local/lib/python3.10/dist-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.4.1)\n",
            "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->onnxruntime>=1.14.1->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (1.3.0)\n",
            "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.4.0->starlette<0.28.0,>=0.27.0->fastapi>=0.85.1->chromadb==0.3.25->-r reqs_optional/requirements_optional_langchain.txt (line 11)) (1.1.1)\n",
            "Requirement already satisfied: timm>=0.9.2 in /usr/local/lib/python3.10/dist-packages (from effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.9.2)\n",
            "Requirement already satisfied: pycocotools>=2.0.2 in /usr/local/lib/python3.10/dist-packages (from effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (2.0.6)\n",
            "Requirement already satisfied: omegaconf>=2.0 in /usr/local/lib/python3.10/dist-packages (from effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (2.3.0)\n",
            "Requirement already satisfied: portalocker in /usr/local/lib/python3.10/dist-packages (from iopath->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (2.7.0)\n",
            "Requirement already satisfied: Wand>=0.6.10 in /usr/local/lib/python3.10/dist-packages (from pdfplumber->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.6.11)\n",
            "Requirement already satisfied: antlr4-python3-runtime==4.9.* in /usr/local/lib/python3.10/dist-packages (from omegaconf>=2.0->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (4.9.3)\n",
            "Requirement already satisfied: matplotlib>=2.1.0 in /usr/local/lib/python3.10/dist-packages (from pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (3.7.1)\n",
            "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.1.0)\n",
            "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (0.11.0)\n",
            "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (4.40.0)\n",
            "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (1.4.4)\n",
            "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.5.1->unstructured[local-inference]==0.7.4->-r reqs_optional/requirements_optional_langchain.txt (line 20)) (3.1.0)\n",
            "Installing collected packages: numpy, pandas\n",
            "  Attempting uninstall: numpy\n",
            "    Found existing installation: numpy 1.24.3\n",
            "    Uninstalling numpy-1.24.3:\n",
            "      Successfully uninstalled numpy-1.24.3\n",
            "  Attempting uninstall: pandas\n",
            "    Found existing installation: pandas 2.0.2\n",
            "    Uninstalling pandas-2.0.2:\n",
            "      Successfully uninstalled pandas-2.0.2\n",
            "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
            "google-colab 1.0.0 requires requests==2.27.1, but you have requests 2.31.0 which is incompatible.\n",
            "tensorflow 2.12.0 requires tensorboard<2.13,>=2.12, but you have tensorboard 2.13.0 which is incompatible.\u001b[0m\u001b[31m\n",
            "\u001b[0mSuccessfully installed numpy-1.23.5 pandas-1.5.3\n",
            "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
            "\u001b[0mRequirement already satisfied: gpt4all==0.3.3 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 1)) (0.3.3)\n",
            "Requirement already satisfied: llama-cpp-python==0.1.68 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 2)) (0.1.68)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from gpt4all==0.3.3->-r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 1)) (2.31.0)\n",
            "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from gpt4all==0.3.3->-r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 1)) (4.65.0)\n",
            "Requirement already satisfied: typing-extensions>=4.5.0 in /usr/local/lib/python3.10/dist-packages (from llama-cpp-python==0.1.68->-r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 2)) (4.6.3)\n",
            "Requirement already satisfied: numpy>=1.20.0 in /usr/local/lib/python3.10/dist-packages (from llama-cpp-python==0.1.68->-r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 2)) (1.23.5)\n",
            "Requirement already satisfied: diskcache>=5.6.1 in /usr/local/lib/python3.10/dist-packages (from llama-cpp-python==0.1.68->-r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 2)) (5.6.1)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->gpt4all==0.3.3->-r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 1)) (2.0.12)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->gpt4all==0.3.3->-r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 1)) (3.4)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->gpt4all==0.3.3->-r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 1)) (1.26.16)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->gpt4all==0.3.3->-r reqs_optional/requirements_optional_llamacpp_gpt4all.txt (line 1)) (2023.5.7)\n",
            "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
            "\u001b[0mRequirement already satisfied: arxiv==1.4.7 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.gpllike.txt (line 1)) (1.4.7)\n",
            "Requirement already satisfied: pymupdf==1.22.3 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.gpllike.txt (line 2)) (1.22.3)\n",
            "Requirement already satisfied: feedparser in /usr/local/lib/python3.10/dist-packages (from arxiv==1.4.7->-r reqs_optional/requirements_optional_langchain.gpllike.txt (line 1)) (6.0.10)\n",
            "Requirement already satisfied: sgmllib3k in /usr/local/lib/python3.10/dist-packages (from feedparser->arxiv==1.4.7->-r reqs_optional/requirements_optional_langchain.gpllike.txt (line 1)) (1.0.0)\n",
            "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
            "\u001b[0mRequirement already satisfied: playwright==1.33.0 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.urls.txt (line 2)) (1.33.0)\n",
            "Requirement already satisfied: selenium==4.10.0 in /usr/local/lib/python3.10/dist-packages (from -r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (4.10.0)\n",
            "Requirement already satisfied: greenlet==2.0.1 in /usr/local/lib/python3.10/dist-packages (from playwright==1.33.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 2)) (2.0.1)\n",
            "Requirement already satisfied: pyee==9.0.4 in /usr/local/lib/python3.10/dist-packages (from playwright==1.33.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 2)) (9.0.4)\n",
            "Requirement already satisfied: urllib3[socks]<3,>=1.26 in /usr/local/lib/python3.10/dist-packages (from selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (1.26.16)\n",
            "Requirement already satisfied: trio~=0.17 in /usr/local/lib/python3.10/dist-packages (from selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (0.22.1)\n",
            "Requirement already satisfied: trio-websocket~=0.9 in /usr/local/lib/python3.10/dist-packages (from selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (0.10.3)\n",
            "Requirement already satisfied: certifi>=2021.10.8 in /usr/local/lib/python3.10/dist-packages (from selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (2023.5.7)\n",
            "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from pyee==9.0.4->playwright==1.33.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 2)) (4.6.3)\n",
            "Requirement already satisfied: attrs>=20.1.0 in /usr/local/lib/python3.10/dist-packages (from trio~=0.17->selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (23.1.0)\n",
            "Requirement already satisfied: sortedcontainers in /usr/local/lib/python3.10/dist-packages (from trio~=0.17->selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (2.4.0)\n",
            "Requirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from trio~=0.17->selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (3.4)\n",
            "Requirement already satisfied: outcome in /usr/local/lib/python3.10/dist-packages (from trio~=0.17->selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (1.2.0)\n",
            "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from trio~=0.17->selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (1.3.0)\n",
            "Requirement already satisfied: exceptiongroup>=1.0.0rc9 in /usr/local/lib/python3.10/dist-packages (from trio~=0.17->selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (1.1.1)\n",
            "Requirement already satisfied: wsproto>=0.14 in /usr/local/lib/python3.10/dist-packages (from trio-websocket~=0.9->selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (1.2.0)\n",
            "Requirement already satisfied: PySocks!=1.5.7,<2.0,>=1.5.6 in /usr/local/lib/python3.10/dist-packages (from urllib3[socks]<3,>=1.26->selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (1.7.1)\n",
            "Requirement already satisfied: h11<1,>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium==4.10.0->-r reqs_optional/requirements_optional_langchain.urls.txt (line 4)) (0.14.0)\n",
            "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
            "\u001b[0m"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# download llama model if running that:\n",
        "!rm -rf WizardLM-7B-uncensored.ggmlv3.q8_0.bin*\n",
        "!wget https://huggingface.co/TheBloke/WizardLM-7B-uncensored-GGML/resolve/main/WizardLM-7B-uncensored.ggmlv3.q8_0.bin"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "cqbMs-61ts-a",
        "outputId": "e29286d7-d912-4b61-e55f-835f813783c9"
      },
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "--2023-07-10 23:45:30--  https://huggingface.co/TheBloke/WizardLM-7B-uncensored-GGML/resolve/main/WizardLM-7B-uncensored.ggmlv3.q8_0.bin\n",
            "Resolving huggingface.co (huggingface.co)... 65.8.178.118, 65.8.178.27, 65.8.178.12, ...\n",
            "Connecting to huggingface.co (huggingface.co)|65.8.178.118|:443... connected.\n",
            "HTTP request sent, awaiting response... 302 Found\n",
            "Location: https://cdn-lfs.huggingface.co/repos/c0/cd/c0cd768b4cd58780ae60ca18240a853723360aac1874854c9e07bc87d943ee47/2802e2c7ffb3cae9bab40425a2600d286b98ed5cc7fe2116fc205a2a101e913e?response-content-disposition=attachment%3B+filename*%3DUTF-8%27%27WizardLM-7B-uncensored.ggmlv3.q8_0.bin%3B+filename%3D%22WizardLM-7B-uncensored.ggmlv3.q8_0.bin%22%3B&response-content-type=application%2Foctet-stream&Expires=1689291930&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY4OTI5MTkzMH19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5odWdnaW5nZmFjZS5jby9yZXBvcy9jMC9jZC9jMGNkNzY4YjRjZDU4NzgwYWU2MGNhMTgyNDBhODUzNzIzMzYwYWFjMTg3NDg1NGM5ZTA3YmM4N2Q5NDNlZTQ3LzI4MDJlMmM3ZmZiM2NhZTliYWI0MDQyNWEyNjAwZDI4NmI5OGVkNWNjN2ZlMjExNmZjMjA1YTJhMTAxZTkxM2U%7EcmVzcG9uc2UtY29udGVudC1kaXNwb3NpdGlvbj0qJnJlc3BvbnNlLWNvbnRlbnQtdHlwZT0qIn1dfQ__&Signature=jXUxing7-us-22%7E%7EdvEcmQk9Fxoc0A1aK2kKx7mxwY0au23c8HKAsLaGhEtoTwvQzC1531TzWGb8DUYBz4uQZWvJXRQGFJOI30YHh5UFTBLufHlSoVMpKasc707xTNOzR3fDmCDV4k90w-5dyaBz%7EJtzVv5w60t77D97xrJGQ-9x6y%7EZ%7Ekr8CRlwupP99DrQg6%7EIJUuCeZmn8Es%7ER0p4nv72aQjq3lDZy6DYmJNoBlYq8Xe-Doj3uoEk910KXtBnUQ8G%7ELNKInkipQGG55SxqJ4Xx77gqHq97a29cwXOnVCmikT8hqtU-fQ1AdJSCdg3wkxU3SUYYaQJ1rrdQp%7EBjA__&Key-Pair-Id=KVTP0A1DKRTAX [following]\n",
            "--2023-07-10 23:45:30--  https://cdn-lfs.huggingface.co/repos/c0/cd/c0cd768b4cd58780ae60ca18240a853723360aac1874854c9e07bc87d943ee47/2802e2c7ffb3cae9bab40425a2600d286b98ed5cc7fe2116fc205a2a101e913e?response-content-disposition=attachment%3B+filename*%3DUTF-8%27%27WizardLM-7B-uncensored.ggmlv3.q8_0.bin%3B+filename%3D%22WizardLM-7B-uncensored.ggmlv3.q8_0.bin%22%3B&response-content-type=application%2Foctet-stream&Expires=1689291930&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY4OTI5MTkzMH19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5odWdnaW5nZmFjZS5jby9yZXBvcy9jMC9jZC9jMGNkNzY4YjRjZDU4NzgwYWU2MGNhMTgyNDBhODUzNzIzMzYwYWFjMTg3NDg1NGM5ZTA3YmM4N2Q5NDNlZTQ3LzI4MDJlMmM3ZmZiM2NhZTliYWI0MDQyNWEyNjAwZDI4NmI5OGVkNWNjN2ZlMjExNmZjMjA1YTJhMTAxZTkxM2U%7EcmVzcG9uc2UtY29udGVudC1kaXNwb3NpdGlvbj0qJnJlc3BvbnNlLWNvbnRlbnQtdHlwZT0qIn1dfQ__&Signature=jXUxing7-us-22%7E%7EdvEcmQk9Fxoc0A1aK2kKx7mxwY0au23c8HKAsLaGhEtoTwvQzC1531TzWGb8DUYBz4uQZWvJXRQGFJOI30YHh5UFTBLufHlSoVMpKasc707xTNOzR3fDmCDV4k90w-5dyaBz%7EJtzVv5w60t77D97xrJGQ-9x6y%7EZ%7Ekr8CRlwupP99DrQg6%7EIJUuCeZmn8Es%7ER0p4nv72aQjq3lDZy6DYmJNoBlYq8Xe-Doj3uoEk910KXtBnUQ8G%7ELNKInkipQGG55SxqJ4Xx77gqHq97a29cwXOnVCmikT8hqtU-fQ1AdJSCdg3wkxU3SUYYaQJ1rrdQp%7EBjA__&Key-Pair-Id=KVTP0A1DKRTAX\n",
            "Resolving cdn-lfs.huggingface.co (cdn-lfs.huggingface.co)... 108.138.64.49, 108.138.64.36, 108.138.64.111, ...\n",
            "Connecting to cdn-lfs.huggingface.co (cdn-lfs.huggingface.co)|108.138.64.49|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 7160808576 (6.7G) [application/octet-stream]\n",
            "Saving to: ‘WizardLM-7B-uncensored.ggmlv3.q8_0.bin’\n",
            "\n",
            "WizardLM-7B-uncenso 100%[===================>]   6.67G  60.7MB/s    in 3m 1s   \n",
            "\n",
            "2023-07-10 23:48:31 (37.8 MB/s) - ‘WizardLM-7B-uncensored.ggmlv3.q8_0.bin’ saved [7160808576/7160808576]\n",
            "\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# Sign-up for free ngrok account using (e.g.) your Google email/login and get token: https://dashboard.ngrok.com/get-started/setup\n",
        "\n",
        "!pip install pyngrok\n",
        "import getpass\n",
        "from pyngrok import ngrok, conf\n",
        "\n",
        "print(\"Enter your authtoken, which can be copied from https://dashboard.ngrok.com/auth\")\n",
        "conf.get_default().auth_token = getpass.getpass()\n",
        "\n",
        "# Open an http ngrok tunnel\n",
        "connection_string = ngrok.connect(7860, \"http\").public_url\n",
        "print(\"Go to this address in about 20 seconds, and click on Visit Site: %s\" % connection_string)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "U1b_FOQZ8snb",
        "outputId": "0c168875-499f-4aff-b066-ea433746b08b"
      },
      "execution_count": 5,
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Requirement already satisfied: pyngrok in /usr/local/lib/python3.10/dist-packages (6.0.0)\n",
            "Requirement already satisfied: PyYAML in /usr/local/lib/python3.10/dist-packages (from pyngrok) (6.0)\n",
            "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
            "\u001b[0mEnter your authtoken, which can be copied from https://dashboard.ngrok.com/auth\n",
            "··········\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "WARNING:pyngrok.process.ngrok:t=2023-07-10T23:48:56+0000 lvl=warn msg=\"ngrok config file found at legacy location, move to XDG location\" xdg_path=/root/.config/ngrok/ngrok.yml legacy_path=/root/.ngrok2/ngrok.yml\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Go to this address in about 20 seconds, and click on Visit Site: https://77c2-35-243-196-63.ngrok-free.app\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "get_ipython().system_raw(\"\"\"GRADIO_SERVER_PORT=7860 python generate.py --base_model='llama' --prompt_type=llama2 --score_model=None --langchain_mode=LLM --langchain_modes=\"['LLM', 'UserData', 'MyData']\" --user_path=user_path --share=False &> logs.txt &\"\"\")\n",
        "# wait a bit for server to come up\n",
        "import time\n",
        "time.sleep(20)"
      ],
      "metadata": {
        "execution": {
          "iopub.status.busy": "2023-04-19T05:18:33.037534Z",
          "iopub.execute_input": "2023-04-19T05:18:33.038673Z",
          "iopub.status.idle": "2023-04-19T05:18:33.045040Z",
          "shell.execute_reply.started": "2023-04-19T05:18:33.038615Z",
          "shell.execute_reply": "2023-04-19T05:18:33.043977Z"
        },
        "trusted": true,
        "id": "OTYGZLxs-chg"
      },
      "execution_count": 6,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "# can see what is running:\n",
        "# !ps -auxwf"
      ],
      "metadata": {
        "id": "6SSQ5JMy8T78"
      },
      "execution_count": 7,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "# can check logs\n",
        "# !cat logs.txt"
      ],
      "metadata": {
        "id": "aHAeiqL89ADF"
      },
      "execution_count": 8,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "# can kill old ngrok + generate and try again, or just restart entire runtime + run all cells\n",
        "do_kill = False\n",
        "if do_kill:\n",
        "  !pkill -f generate --signal 9\n",
        "  !pkill -f frpc_linux_amd --signal 9\n",
        "  !pkill -f ngrok --signal 9"
      ],
      "metadata": {
        "id": "dxd6BkoP9sKh"
      },
      "execution_count": 9,
      "outputs": []
    }
  ]
}